//
// Created by sjjmw on 3/24/2022.
//
#include "iostream"
#include "vector"
#include "list"
#include "algorithm"
#include "string"
#include "unordered_map"
#include "cmath"
#include<iomanip>
#include "string"
#include "map"
#include "list"
struct Pos{
    int x;
    int y;
};
struct Sol{
    int ans=0;
    int max;
    void recur(int len){
        if(len>max){
            return;
        }else if(len==max){
            ans++;
            return;
        }

        recur(len+1);
        recur(len+2);
    }
    void handle(int n
            ){
        max=n;
        recur(0);

        printf("%d\n",ans);
    }
};
int main(){
//    int a,b,c;
    float a,b,c,d;
    int e;
    while(std::cin>>a){
        Sol().handle(a);
    }

    return 0;
}